<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>物料管理系统</title>
		<link rel="stylesheet" type="text/css" href="./static/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="./static/css/admin.css" />
		<script src="./js/jquery-2.0.3.js" type="text/javascript" charset="utf-8"></script>

		<script type="text/javascript">
			$(function(){
				//初始化时默认无权限
				$("#selectpower").hide();
				$("#kucunsel").hide();
				$("#redone").hide();
				$("#zhuguandb").hide();
				$("#jinglidb").hide();
				$("#caigoudb").hide();
				$("#cangguandb").hide();
				$("#zhijiandb").hide();
				$("#lingliaodb").hide();
				$("#zhuguansp").hide();
				$("#jinglisp").hide();
				$("#caigousp").hide();
				$("#cangguansp").hide();
				$("#zhijiansp").hide();
				$("#empma").hide();
				$("#deptma").hide();
				$("#updateinfo").hide();
				
				//获取session中存放的权限值--根据不同的权限需求显示功能模块
				var power="<%=session.getAttribute("power")%>"; 
				
				if(power == 100){//管理员
					$("#selectpower").show();
					$("#kucunsel").show();
					$("#empma").show();
					$("#deptma").show();
					$("#daiban1").hide();
					$("#shenpi1").hide();
					$("#gongzuo").hide();
					
				} else if(power == 1){//员工 
					$("#redone").show();
					$("#updateinfo").show();
					
				} else if(power == 2){//主管
					$("#zhuguandb").show();
					$("#zhuguansp").show();
					$("#updateinfo").show();
					
				} else if(power == 3){//采购
					$("#caigoudb").show();
					$("#caigousp").show();
					$("#updateinfo").show();
					
				} else if(power == 4){//质检
					$("#zhijiandb").show();
					$("#zhijiansp").show();
					$("#updateinfo").show();
					
				} else if(power == 5){//仓管
					$("#kucunsel").show();
					$("#cangguandb").show();
					$("#cangguansp").show();
					$("#updateinfo").show();
					
				} else if(power == 6){//经理
					$("#jinglidb").show();
					$("#jinglisp").show();
					$("#updateinfo").show();s
					
				}
				
			});
		</script>
		<!-- <script type="text/javascript">
		$(function(){
			$("#loginout").click(function(){
				$.ajax({
					url : 'remove',
					type : "post",
					//dataType : "json",
					success : function() {
						//console.log(data);
					
					}
				});
			});
		});
		</script> -->
	</head>
	<body>
		<div class="main-layout" id='main-layout'>
			<!--侧边栏-->
			<div class="main-layout-side">
				<div style="width: 200px; height: 60px;background-color: #1E9FFF;
					color: white;text-align: center; font-size: 25px;line-height: 60px;font-family: "
				 黑体";">
					<i>物料管理系统</i>
				</div>
				<ul class="layui-nav layui-nav-tree" lay-filter="leftNav">
					<li class="layui-nav-item layui-nav-itemed" id="selectpower">
						<a href="javascript:;"><i class="iconfont">&#xe607;</i>菜单管理</a>
						<dl class="layui-nav-child">
							<dd id="kucunsel"><a href="javascript:;" data-url="kucun-query.jsp" data-id='1' data-text="库存查询"><span class="l-line"></span>库存查询</a></dd>
							<dd id="searchsel"><a href="javascript:;" data-url="shenqing-query.jsp" data-id='2' data-text="申请查询"><span class="l-line"></span>申请查询</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;" id="gongzuo"><i class="iconfont">&#xe608;</i>工作空间</a>
						<dl class="layui-nav-child">
							<dd><a href="javascript:;" data-url="shenqing-add.jsp" data-id='3' data-text="新建申请"><span class="l-line"></span>新建申请</a></dd>
							<dd><a href="javascript:;" data-url="my-shenqing.jsp" data-id='4' data-text="我的申请"><span class="l-line"></span>我的申请</a></dd>
						</dl>
					</li>
					
										<li class="layui-nav-item">
						<a href="javascript:;" id="daiban1"><i class="iconfont">&#xe608;</i>待办事项</a>
						<dl class="layui-nav-child">
							<dd id="redone"><a href="javascript:;" data-url="wait-list01.jsp" data-id='5' data-text="退回代办"><span class="l-line"></span>退回待办</a></dd>
							<dd id="zhuguandb"><a href="javascript:;" data-url="wait-list02.jsp" data-id='6' data-text="主管待办"><span class="l-line"></span>主管待办</a></dd>
							<dd id="jinglidb"><a href="javascript:;" data-url="wait-list03.jsp" data-id='7' data-text="经理待办"><span class="l-line"></span>经理待办</a></dd>
							<dd id="caigoudb"><a href="javascript:;" data-url="wait-list04.jsp" data-id='8' data-text="采购待办"><span class="l-line"></span>采购待办</a></dd>
							<dd id="zhijiandb"><a href="javascript:;" data-url="wait-list05.jsp" data-id='9' data-text="质检待办"><span class="l-line"></span>质检待办</a></dd>
							<dd id="cangguandb"><a href="javascript:;" data-url="wait-list06.jsp" data-id='10' data-text="仓管待办"><span class="l-line"></span>仓管待办</a></dd>
							<dd id="lingliaodb"><a href="javascript:;" data-url="wait-list07.jsp" data-id='11' data-text="领料待办"><span class="l-line"></span>领料待办</a></dd>
						</dl>
					</li>
					
					<li class="layui-nav-item">
						<a href="javascript:;" id="shenpi1"><i class="iconfont">&#xe604;</i>审批处理</a>
						<dl class="layui-nav-child">
							<dd id="zhuguansp"><a href="javascript:;" data-url="shenpi-list02.jsp" data-id='12' data-text="主管审批"><span class="l-line"></span>主管审批</a></dd>
							<dd id="jinglisp"><a href="javascript:;" data-url="shenpi-list03.jsp" data-id='13' data-text="经理审批"><span class="l-line"></span>经理审批</a></dd>
							<dd id="caigousp"><a href="javascript:;" data-url="shenpi-list04.jsp" data-id='14' data-text="采购处理"><span class="l-line"></span>采购处理</a></dd>
							<dd id="zhijiansp"><a href="javascript:;" data-url="shenpi-list05.jsp" data-id='15' data-text="质检处理"><span class="l-line"></span>质检处理</a></dd>
							<dd id="cangguansp"><a href="javascript:;" data-url="shenpi-list06.jsp" data-id='16' data-text="仓管审批"><span class="l-line"></span>仓管审批</a></dd>
						</dl>
					</li>
					<!-- <li class="layui-nav-item">
						<a href="javascript:;" data-url="by-list.jsp" data-id='7' data-text="采购信息"><i class="iconfont">&#xe60c;</i>采购信息</a>
					</li> -->
					
					<li class="layui-nav-item" id="updateinfo">
						<a href="javascript:;" data-url="admin-info.jsp" data-id='18' data-text="个人信息"><i class="iconfont">&#xe606;</i>个人信息</a>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;"><i class="iconfont">&#xe60b;</i>系统设置</a>
						<dl class="layui-nav-child">
							<dd id="aboutus"><a href="javascript:;" data-url="aboutus.jsp" data-id='19' data-text="关于我们"><span class="l-line"></span>关于我们</a></dd>
							<dd id="empma"><a href="javascript:;" data-url="emp-manage.jsp" data-id='20' data-text="员工管理"><span class="l-line"></span>员工管理</a></dd>
							<dd id="deptma"><a href="javascript:;" data-url="emp-manage.jsp" data-id='21' data-text="部门管理"><span class="l-line"></span>部门管理</a></dd>
						</dl>
					</li>


				</ul>
			</div>




			<!--右侧内容-->
			<div class="main-layout-container">
				<!--头部-->
				<div class="main-layout-header">
					<div class="menu-btn" id="hideBtn">
						<a href="javascript:;">
							<span class="iconfont">&#xe60e;</span>
						</a>
					</div>
					<ul class="layui-nav" lay-filter="rightNav">
						<li class="layui-nav-item"><a href="javascript:;" data-url="" data-id='12' data-text="邮件系统"><i class="iconfont">&#xe603;</i></a></li>
						<li class="layui-nav-item">
							<a href="javascript:;" data-url="admin-info.jsp" data-id='8' data-text="个人信息">${empno}</a>
						</li>
						<li class="layui-nav-item"><a href="remove" id="loginout" onclick="return confirm('您确定要退出系统吗?');">退出</a></li>
					</ul>
				</div>



				<!--主体内容-->
				<div class="main-layout-body">
					<!--tab 切换-->
					<div class="layui-tab layui-tab-brief main-layout-tab" lay-filter="tab" lay-allowClose="true">
						<ul class="layui-tab-title">
							<li class="layui-this welcome">后台主页</li>
						</ul>
						<div class="layui-tab-content">
							<div class="layui-tab-item layui-show" style="background: #f5f5f5;">
								<!--1-->
								<iframe src="welcome.jsp" width="100%" height="100%" name="iframe" scrolling="auto" class="iframe" framborder="0"></iframe>
								<!--1end-->
							</div>
						</div>
					</div>
				</div>
			</div>



			<!--遮罩-->
			<div class="main-mask">

			</div>



		</div>

		<script type="text/javascript">
			var scope = {
				link: './welcome.jsp'
			}
		</script>


		<script src="./static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="./static/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="./static/js/main.js" type="text/javascript" charset="utf-8"></script>

	</body>
</html>
    